package com.tongna.service;

import com.tongna.dao.NewsDao;
import com.tongna.domain.News;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * TenantDemo
 *
 * @author 张浩伟
 * @version 1.01 2018年02月09日
 */
@Service
public class NewsService {


    @Autowired
    private NewsDao dao;

    public List<News> findAll(){
        return dao.findAll();
    }

    public void add(News news){
        dao.add(news);
    }

    public News findOne(Long id){
        return dao.findOne(id);
    }

}
